package com.rockcent.mall.lib.dto;

import com.rockcent.common.domain.DtoEntity;
import com.rockcent.mall.lib.domain.enumclass.ProductStatus;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;

/**
 * Created by DK on 16/9/18.
 * 分销市场分销产品DTO
 */
public class MarketMerchantProductSalesDto extends DtoEntity {

    //产品唯一识别码
    private String productId;
    //供应商 平台id
    private Long supplierMallId;
    //供应商 id
    private Long supplierMerchantId;
    // 供应商分销状态 PASS("允许"), REFUSE("拒绝")
    private String supplierStatus;
    //分销商 平台id
    private Long distributorMallId;
    //分销商 id
    private Long distributorMerchantId;
    // 分销商分销状态 PASS("允许"), REFUSE("拒绝")
    private String distributorStatus;
    // 产品名称
    private String productName;
    // 产品原价
    private Double productBasePrice;
    // 产品售价
    private Double productSellPrice;

    // 产品库存数量
    private Long productQuantity;
    // 产品有效期结束时间
    private Date productDateDisabled;
    //产品状态
    private String productStatus;
    // 产品类型
    private String productType;

    /**
     * 自定义方法 start ================================================================================
     */
    public String getProductStatusText() {
        if (StringUtils.isBlank(this.productStatus)) {
            return null;
        }
        return ProductStatus.valueOf(this.productStatus).getValue();
    }

    /**
     * 自定义方法 end ================================================================================
     */
    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public Long getSupplierMallId() {
        return supplierMallId;
    }

    public void setSupplierMallId(Long supplierMallId) {
        this.supplierMallId = supplierMallId;
    }

    public Long getSupplierMerchantId() {
        return supplierMerchantId;
    }

    public void setSupplierMerchantId(Long supplierMerchantId) {
        this.supplierMerchantId = supplierMerchantId;
    }

    public String getSupplierStatus() {
        return supplierStatus;
    }

    public void setSupplierStatus(String supplierStatus) {
        this.supplierStatus = supplierStatus;
    }

    public Long getDistributorMallId() {
        return distributorMallId;
    }

    public void setDistributorMallId(Long distributorMallId) {
        this.distributorMallId = distributorMallId;
    }

    public Long getDistributorMerchantId() {
        return distributorMerchantId;
    }

    public void setDistributorMerchantId(Long distributorMerchantId) {
        this.distributorMerchantId = distributorMerchantId;
    }

    public String getDistributorStatus() {
        return distributorStatus;
    }

    public void setDistributorStatus(String distributorStatus) {
        this.distributorStatus = distributorStatus;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public Double getProductBasePrice() {
        return productBasePrice;
    }

    public void setProductBasePrice(Double productBasePrice) {
        this.productBasePrice = productBasePrice;
    }

    public Double getProductSellPrice() {
        return productSellPrice;
    }

    public void setProductSellPrice(Double productSellPrice) {
        this.productSellPrice = productSellPrice;
    }

    public Long getProductQuantity() {
        return productQuantity;
    }

    public void setProductQuantity(Long productQuantity) {
        this.productQuantity = productQuantity;
    }

    public Date getProductDateDisabled() {
        return productDateDisabled;
    }

    public void setProductDateDisabled(Date productDateDisabled) {
        this.productDateDisabled = productDateDisabled;
    }

    public String getProductStatus() {
        return productStatus;
    }

    public void setProductStatus(String productStatus) {
        this.productStatus = productStatus;
    }

    public String getProductType() {
        return productType;
    }

    public void setProductType(String productType) {
        this.productType = productType;
    }

    @Override
    public String toString() {
        return "MarketMerchantProductSalesDto{" +
                "productId='" + productId + '\'' +
                ", supplierMallId=" + supplierMallId +
                ", supplierMerchantId=" + supplierMerchantId +
                ", supplierStatus='" + supplierStatus + '\'' +
                ", distributorMallId=" + distributorMallId +
                ", distributorMerchantId=" + distributorMerchantId +
                ", distributorStatus='" + distributorStatus + '\'' +
                ", productName='" + productName + '\'' +
                ", productBasePrice=" + productBasePrice +
                ", productSellPrice=" + productSellPrice +
                ", productQuantity=" + productQuantity +
                ", productDateDisabled=" + productDateDisabled +
                ", productStatus='" + productStatus + '\'' +
                ", productType='" + productType + '\'' +
                '}';
    }
}
